<?php
class Session {
	private $idMembre;
	private $nom;
	private $pseudo;
	private $residence;
	private $idresidence;
	private $accessLevel;
	private $isLogin;
	private $ville;
	
	function __construct($id){
		$this->idMembre=$id;
		$query="select * from residence join membres on
				id_residence=residence_id_residence where id_membre='$id'";
		$result=runQuery($query);
		$row=mysql_fetch_assoc($result);
		$_SESSION['idmembre']=$row['id_membre'];
		$_SESSION['nom']=$row['nom'];
		$_SESSION['pseudo']=$row['pseudo'];
		$_SESSION['residence']=$row['nom_residence'];
		$_SESSION['idresidence']=$row['id_residence'];
		$_SESSION['accessLevel']=$row['authorisation'];
		$_SESSION['ville']=$row['ville'];
		$_SESSION['isLogin']=true;
	}
	/*public function getidMembre(){return $this->idMembre;}
	public function getNom(){return $this->nom;}
	public function getPseudo(){return $this->pseudo;}
	public function getaccessLevel(){return $this->accessLevel;}
	public function getIsLogin(){return $this->isLogin;}
	public function getVille(){return $this->ville;}*/
	public function setIdMembre(){
	}
	public function setNom(){
		
	}
	public function setPseudo(){
	}
	public function setaccessLevel(){
		
	}
	public function setIsLogin(){
		
	}
	public function setVille(){
		
	}
}